/*
 * File: Fu_RotAngObsPLL.h
 *
 * Code generated for Simulink model 'Fu_RotAngObsPLL'.
 *
 * Model version                  : 1.691
 * Simulink Coder version         : 8.2 (R2012a) 29-Dec-2011
 * TLC version                    : 8.2 (Dec 29 2011)
 * C/C++ source code generated on : Sun Jun 09 21:12:43 2013
 *
 * Target selection: ert.tlc
 * Embedded hardware selection: ARM Compatible->ARM Cortex
 * Code generation objectives: Unspecified
 * Validation result: Not run
 */

#ifndef RTW_HEADER_Fu_RotAngObsPLL_h_
#define RTW_HEADER_Fu_RotAngObsPLL_h_
#ifndef Fu_RotAngObsPLL_COMMON_INCLUDES_
# define Fu_RotAngObsPLL_COMMON_INCLUDES_
#include <stddef.h>
#include <string.h>
#include "rtwtypes.h"
#include "rtw_shared_utils.h"
#endif                                 /* Fu_RotAngObsPLL_COMMON_INCLUDES_ */

#include "Fu_RotAngObsPLL_types.h"

/* Macros for accessing real-time model data structure */
#ifndef rtmGetErrorStatus
# define rtmGetErrorStatus(rtm)        ((rtm)->errorStatus)
#endif

#ifndef rtmSetErrorStatus
# define rtmSetErrorStatus(rtm, val)   ((rtm)->errorStatus = (val))
#endif

/* Block signals (auto storage) */
typedef struct {
  int16_T RotAngObsPLL_RotSpdRaw;      /* '<S1>/Add1' */
} BlockIO_Fu_RotAngObsPLL;

/* Block states (auto storage) for system '<Root>' */
typedef struct {
  int32_T LowPass_circBuf;             /* '<S1>/LowPass' */
  int32_T Memory_PreviousInput;        /* '<S2>/Memory' */
  int16_T LowPass_states[2];           /* '<S1>/LowPass' */
  int16_T DiscreteTimeIntegrator_DSTATE;/* '<S1>/Discrete-Time Integrator' */
  int16_T Memory_PreviousInput_g;      /* '<S5>/Memory' */
  int16_T Memory_PreviousInput_b;      /* '<S6>/Memory' */
} D_Work_Fu_RotAngObsPLL;

/* Constant parameters (auto storage) */
typedef struct {
  /* Computed Parameter: LowPass_Coefficients
   * Referenced by: '<S1>/LowPass'
   */
  int16_T LowPass_Coefficients[3];
} ConstParam_Fu_RotAngObsPLL;

/* Real-time Model Data Structure */
struct RT_MODEL_Fu_RotAngObsPLL {
  const char_T * volatile errorStatus;
};

/* Block signals (auto storage) */
extern BlockIO_Fu_RotAngObsPLL Fu_RotAngObsPLL_B;

/* Block states (auto storage) */
extern D_Work_Fu_RotAngObsPLL Fu_RotAngObsPLL_DWork;

/* Constant parameters (auto storage) */
extern const ConstParam_Fu_RotAngObsPLL Fu_RotAngObsPLL_ConstP;

/*
 * Exported Global Signals
 *
 * Note: Exported global signals are block signals with an exported global
 * storage class designation.  Code generation will declare the memory for
 * these signals and export their symbols.
 *
 */
extern int32_T loc_PLL_Ud_Diff;        /* '<S4>/Add' */
extern int16_T RotAngObsPLL_RotSpdRPM; /* '<S1>/Product2' */
extern int16_T loc_PLL_MathSpd;        /* '<S3>/Product3' */
extern uint16_T RotAngObsPLL_RotPos;   /* '<S2>/Data Type Conversion' */
extern int16_T RotAngObsPLL_RotSpRadSec;/* '<S1>/Data Type Conversion' */

/* Model entry point functions */
extern void Fu_RotAngObsPLL_initialize(void);
extern void Fu_RotAngObsPLL_step(void);

/* Real-time Model object */
extern struct RT_MODEL_Fu_RotAngObsPLL *const Fu_RotAngObsPLL_M;

/*-
 * The generated code includes comments that allow you to trace directly
 * back to the appropriate location in the model.  The basic format
 * is <system>/block_name, where system is the system number (uniquely
 * assigned by Simulink) and block_name is the name of the block.
 *
 * Use the MATLAB hilite_system command to trace the generated code back
 * to the model.  For example,
 *
 * hilite_system('<S3>')    - opens system 3
 * hilite_system('<S3>/Kp') - opens and selects block Kp which resides in S3
 *
 * Here is the system hierarchy for this model
 *
 * '<Root>' : 'Fu_RotAngObsPLL'
 * '<S1>'   : 'Fu_RotAngObsPLL/Fu_RotAngObsPLL'
 * '<S2>'   : 'Fu_RotAngObsPLL/Fu_RotAngObsPLL/AngleIntegrator'
 * '<S3>'   : 'Fu_RotAngObsPLL/Fu_RotAngObsPLL/Fu_RotAngObsPLL_BackEMFModel'
 * '<S4>'   : 'Fu_RotAngObsPLL/Fu_RotAngObsPLL/Fu_RotAngObsPLL_FluxPLLModel'
 * '<S5>'   : 'Fu_RotAngObsPLL/Fu_RotAngObsPLL/Fu_RotAngObsPLL_BackEMFModel/DigitalDerivate'
 * '<S6>'   : 'Fu_RotAngObsPLL/Fu_RotAngObsPLL/Fu_RotAngObsPLL_FluxPLLModel/DigitalDerivate'
 */
#endif                                 /* RTW_HEADER_Fu_RotAngObsPLL_h_ */

/*
 * File trailer for generated code.
 *
 * [EOF]
 */
